home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Mac OS / AppleShare IP 6.3 SDK / ASIP Registry / Headers / AppleShareFileServerRegistry.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-01  |  14.5 KB  |  432 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        AppleShareFileServerRegistry.h
  3.  
  4.      Contains:    Registry records for file server.
  5.  
  6.      Version:    Technology:    AppleShare IP 6.0
  7.                  Release:    ASIP 6.2 SDK - Wednesday, August 25, 1999 09:29:55
  8.  
  9.      Copyright:    © 1995-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __APPLESHAREFILESERVERREGISTRY__
  18. #define __APPLESHAREFILESERVERREGISTRY__
  19.  
  20. #ifndef __FILES__
  21. #include <Files.h>
  22. #endif
  23.  
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47. typedef unsigned char                     Str42[43];
  48. typedef unsigned char                     Str199[200];
  49. enum {
  50.     kFSCreatorSig                = FOUR_CHAR_CODE('ipwf')        /* Attribute Signature for FileServer Service object attributes*/
  51. };
  52.  
  53. enum {
  54.                                                                 /* Attribute Types for FileServer Service object each attribute */
  55.     kFSServerInfoType            = FOUR_CHAR_CODE('srvr'),        /* ServerInfo*/
  56.     kFSServerGreetingType        = FOUR_CHAR_CODE('gret'),
  57.     kFSCacheInfoType            = FOUR_CHAR_CODE('cach'),
  58.     kFSIdleUserInfoType            = FOUR_CHAR_CODE('idle'),
  59.     kFSAdminInfoType            = FOUR_CHAR_CODE('admm'),
  60.     kFSHTTPInfoType                = FOUR_CHAR_CODE('http'),
  61.     kFSHTTPFolderType            = FOUR_CHAR_CODE('hfol'),
  62.     kFSHTTPFileType                = FOUR_CHAR_CODE('hfil'),
  63.     kFSHTTPPluginType            = FOUR_CHAR_CODE('hplg'),
  64.     kFSMultiWebDirSig            = FOUR_CHAR_CODE('webd'),        /* Multi Domain signature */
  65.     kFSHTTPWebDirCountType        = FOUR_CHAR_CODE('domC'),
  66.     kFSHTTPWebDirType            = FOUR_CHAR_CODE('0000'),
  67.     kFSFTPInfoType                = FOUR_CHAR_CODE('ftp '),
  68.     kFSAFPInfoType                = FOUR_CHAR_CODE('afp '),
  69.     kFSSMBInfoType                = FOUR_CHAR_CODE('smb '),
  70.     kFSMimeType                    = FOUR_CHAR_CODE('mime'),
  71.     kFSIPFilterType                = FOUR_CHAR_CODE('filt'),
  72.     kFSMaxConnection            = FOUR_CHAR_CODE('maxc'),        /* max concurrent connection */
  73.                                                                 /* additions for ASIP 6.2*/
  74.     kFSRestrictToSingleLogin    = FOUR_CHAR_CODE('r2sL'),        /* Boolean; default false */
  75.     kFSNewFolderOwner            = FOUR_CHAR_CODE('newF'),        /* Boolean; default false */
  76.     kFSRegisterFTPwithNSL        = FOUR_CHAR_CODE('Nftp'),        /* Boolean; default true */
  77.     kFSRegisterAFPwithNSL        = FOUR_CHAR_CODE('Nafp'),        /* Boolean; default true */
  78.     kFSRegisterHTTPwithNSL        = FOUR_CHAR_CODE('Nweb'),        /* Boolean; default true */
  79.     kFSAppleTalkAllowed            = FOUR_CHAR_CODE('atlk'),        /* Boolean; default depends on Easy Setup */
  80.     kFSSendGreetingOnce            = FOUR_CHAR_CODE('1grt'),        /* Boolean; default true */
  81.     kFSSleepTime                = FOUR_CHAR_CODE('inso')        /* UInt32 in seconds; default 86400 (24 hours) */
  82. };
  83.  
  84. /* Service specific advanced options */
  85. enum {
  86.     kFSAFPTCPSig                = FOUR_CHAR_CODE('afpt'),        /* AFP over TCP port signature */
  87.     kFSSMBInfoSig                = FOUR_CHAR_CODE('smb '),        /* SMB over TCP port signature */
  88.     kFSHTTPInfoSig                = FOUR_CHAR_CODE('http'),        /* HTTP port signature */
  89.     kFSFTPInfoSig                = FOUR_CHAR_CODE('ftp ')        /* FTP port signature */
  90. };
  91.  
  92. enum {
  93.     kFSPortType                    = FOUR_CHAR_CODE('port'),        /* port number (UInt16) for all services */
  94.     kFSSessionTimeout            = FOUR_CHAR_CODE('ssto')        /* session timeouts for all services (SInt32) */
  95. };
  96.  
  97. enum {
  98.     kFSTransferTimeout            = FOUR_CHAR_CODE('trto'),        /* transfer timeout for kFSFTPInfoSig (SInt32) */
  99.     kFSKeepAliveTimeout            = FOUR_CHAR_CODE('kato'),        /* keep alive timeout for kFSHTTPInfoSig (SInt32) */
  100.     kFSCGITimeout                = FOUR_CHAR_CODE('cgto'),        /* CGI timeout for kFSHTTPInfoSig (SInt32) */
  101.     kFSLogSize                    = FOUR_CHAR_CODE('logs')        /* Log Size - for kFSHTTPInfoSig (UInt32) */
  102. };
  103.  
  104. /* UAM information... */
  105. enum {
  106.     kFSUAMInfoSig                = FOUR_CHAR_CODE('uam ')        /* Signature */
  107. };
  108.  
  109.  
  110. enum {
  111.     kFSNumUAMS                    = FOUR_CHAR_CODE('uamc'),        /* Number of UAMs (UInt32) */
  112.     kFSUAMNames                    = FOUR_CHAR_CODE('uams')        /* UAM names (buffer of packed pascal strings) */
  113. };
  114.  
  115. /*----------------------------------------------------------*/
  116. /*        Server Preference - General Information                */
  117. /*----------------------------------------------------------*/
  118. enum {
  119.     kFSServerInfoVersion        = 1
  120. };
  121.  
  122.  
  123.  
  124. struct ServerInfo {
  125.     SInt16                             versionNumber;                /* version number for this record */
  126.     SInt16                             fileServerVersion;            /* version# for file server */
  127.     SInt16                             userActivityLimit;            /* user activity limit in % */
  128.     SInt16                             maxLogin;                    /* maximum client connections */
  129.     SInt16                             maxGuestAccess;                /* maximum number of guest and anonymous logins */
  130.     SInt16                             shutdownMinutes;            /* minutes until shutdown */
  131. };
  132. typedef struct ServerInfo                ServerInfo;
  133. /*----------------------------------------------------------*/
  134. /*        Server Preference - connect info & Login Greeting    */
  135. /*----------------------------------------------------------*/
  136. enum {
  137.     kFSServerGreetingVersion    = 1
  138. };
  139.  
  140.  
  141. struct ServerGreeting {
  142.     SInt16                             versionNumber;                /* version number for this record */
  143.     Str199                             greetingMsg;                /* login greeting */
  144. };
  145. typedef struct ServerGreeting            ServerGreeting;
  146. /*----------------------------------------------------------*/
  147. /*        Server Preference - Additional Cache Information    */
  148. /*----------------------------------------------------------*/
  149. enum {
  150.     kFSCacheInfoVersion            = 1
  151. };
  152.  
  153.  
  154. struct CacheInfo {
  155.     SInt16                             versionNumber;                /* version number for this record */
  156.     SInt32                             cacheForOthers;                /* memory to be reserved for other applications */
  157. };
  158. typedef struct CacheInfo                CacheInfo;
  159. /*----------------------------------------------------------*/
  160. /*        Server Preference - Idle User Information            */
  161. /*----------------------------------------------------------*/
  162. /* idleFlag bits. */
  163. enum {
  164.     kFSIdleDisconEnabledMask    = 0x0001,                        /* allow to disconnect idle users */
  165.     kFSDisconExeptOpenFilesMask    = 0x0002,                        /* if true, disconnect except open file users */
  166.     kFSDisconSuperUserMask        = 0x0004,                        /* if true, isconnect idel super users */
  167.     kFSDisconNormalUserMask        = 0x0008,                        /* if true, disconnect idle normal users */
  168.     kFSDisconGuestUserMask        = 0x0010                        /* if true, disconnect idle guest users */
  169. };
  170.  
  171.  
  172. enum {
  173.     kFSIdleUserInfoVersion        = 1
  174. };
  175.  
  176.  
  177. struct IdleUserInfo {
  178.     SInt16                             versionNumber;                /* version number for this record */
  179.     SInt16                             idleFlag;                    /* see above */
  180.     SInt16                             idleMinute;                    /* max # of minute for idle users */
  181.     Str199                             disconnectMsg;                /* disconnect message */
  182. };
  183. typedef struct IdleUserInfo                IdleUserInfo;
  184. /*----------------------------------------------------------*/
  185. /*        Server Preference - Serial Miscelleneous Information*/
  186. /*----------------------------------------------------------*/
  187. enum {
  188.     kFSAdminInfoVersion            = 1
  189. };
  190.  
  191.  
  192. struct AdminInfo {
  193.     SInt16                             versionNumber;                /* version number for this record */
  194.     Str31                             namePhone;                    /* name & phone */
  195.     Str31                             organization;                /* organization */
  196. };
  197. typedef struct AdminInfo                AdminInfo;
  198. /*----------------------------------------------------------*/
  199. /*        Server Preference - HTTP Information                */
  200. /*----------------------------------------------------------*/
  201. /* Flag bits.     */
  202. enum {
  203.     kFSMultiDomainEnabled        = 0x0001,                        /* allow multi-domain support */
  204.     kFSDirListingEnabled        = 0x0002,                        /* allow directory listing */
  205.     kFSAutoShareWebFolder        = 0x0004                        /* if on, web folder share point at start up; server will clear */
  206. };
  207.  
  208. enum {
  209.     kFSHTTPServiceInfoVersion    = 2
  210. };
  211.  
  212. enum {
  213.     kFSHTTPEnable                = 1,                            /* enable HTTP*/
  214.     kFSHTTPLogEnable            = 1,                            /* enable HTTP Log*/
  215.     kFSHTTPGuestEnable            = 1                                /* guest turned on for HTTP*/
  216. };
  217.  
  218.  
  219. struct HTTPServiceInfo {
  220.     SInt16                             versionNumber;                /* version number for this record */
  221.     SInt16                             enabled;                    /* Enable HTTP, 1-enable, 0-not enable */
  222.     SInt16                             status;
  223.     SInt16                             logEnabled;                    /* Enable HTTP Log, 1-enable, 0-not enable */
  224.     SInt16                             maxConnect;                    /* HTTP maximum client connections */
  225.     SInt16                             guestEnabled;                /* Whether guest allowed for HTTP */
  226.     SInt32                             flag;                        /* new field for ASIP6 */
  227. };
  228. typedef struct HTTPServiceInfo            HTTPServiceInfo;
  229.  
  230. struct HTTPFolderRec {
  231.     SInt16                             vRefNum;                    /* HTML folder path vRefNum*/
  232.     Str27                             volumeName;                    /* HTML folder path volume name*/
  233.     UInt32                             volCreateDate;                /* HTML folder path volume creation date*/
  234.     SInt32                             dirID;                        /* HTML folder path DirID*/
  235.     Str255                             webFolderPath;                /* HTML folder path. Does NOT include volume name */
  236. };
  237. typedef struct HTTPFolderRec            HTTPFolderRec;
  238.  
  239. struct HTTPFileRec {
  240.     Str255                             partialPath;                /* partial path to HTML file starting from the Web folder */
  241. };
  242. typedef struct HTTPFileRec                HTTPFileRec;
  243. enum {
  244.     kFSPlugInEnable                = 1,                            /* enable Plug-ins*/
  245.     kFSPlugInLoggingEnable        = 1                                /* enable Plug-in logging*/
  246. };
  247.  
  248.  
  249. struct HTTPPlugInsRec {
  250.     SInt16                             pluginEnable;                /* Plug-ins,  1-enable, 0-not enable */
  251.     SInt16                             loggingEnable;                /* Plug-in logging, 1-enable, 0-not enable */
  252.     SInt32                             memSize;                    /* Plug-in memory allocation */
  253.     FSSpec                             preProcessorSpec;            /* Preprocessor plugin spec */
  254.     FSSpec                             postProcessorSpec;            /* Postprocessor plugin spec */
  255.     FSSpec                             errorSpec;                    /* Error plugin spec */
  256. };
  257. typedef struct HTTPPlugInsRec            HTTPPlugInsRec;
  258.  
  259. struct VolSpec {
  260.     Str32                             vName;                        /* pascal string because FSSpec uses pascal string*/
  261.     UInt8                             filler;
  262.     SInt16                             vRefNum;
  263.     UInt32                             vCreateDate;
  264. };
  265. typedef struct VolSpec                    VolSpec;
  266. enum {
  267.     kFSHTTPWebDirCountRecVersion = 1
  268. };
  269.  
  270.  
  271. struct HTTPWebDirCountRec {
  272.     UInt16                             count;                        /* How many HTTPWebDirRec there are */
  273.     SInt16                             version;                    /* Version of the HTTPWebDirRec */
  274. };
  275. typedef struct HTTPWebDirCountRec        HTTPWebDirCountRec;
  276. enum {
  277.     kFSWebFolderEnabled            = 1
  278. };
  279.  
  280. enum {
  281.     kFSAddressTypeDNS            = 0,
  282.     kFSAddressTypeIPAddress        = 1
  283. };
  284.  
  285.  
  286. struct HTTPWebDirRec {
  287.     UInt16                             enabled;                    /* 1 == this web folder enabled, 0 == disabled */
  288.     SInt16                             addressType;                /* Indicates how to decode addressText: 0 == DNS name, 1 = IP Address (in ASCII) */
  289.     Str63                             addressText;                /* Domain name or IP address (in ASCII) of this web folder (pascal str) See addressType field */
  290.     UInt16                             portNumber;                    /* Port number for this web folder's IP address (InetPort) */
  291.     VolSpec                         volSpec;                    /* Volume specifier */
  292.     SInt32                             dirID;                        /* Dir ID of this web folder */
  293. };
  294. typedef struct HTTPWebDirRec            HTTPWebDirRec;
  295. /*----------------------------------------------------------*/
  296. /*        Server Preference - FTP Information                    */
  297. /*----------------------------------------------------------*/
  298. enum {
  299.     kFSFTPServiceInfoVersion    = 1
  300. };
  301.  
  302.  
  303. struct FTPServiceInfo {
  304.     SInt16                             versionNumber;                /* version number for this record */
  305.     SInt16                             ftpEnable;                    /* Enable FTP, 1-enable, 0-not enable */
  306.     SInt16                             status;
  307.     SInt16                             ftpAnonymousEnable;            /* Enable Anonymous Login, 1-enable, 0-not enable */
  308. };
  309. typedef struct FTPServiceInfo            FTPServiceInfo;
  310. /*----------------------------------------------------------*/
  311. /*        Server Preference - AFP Information                    */
  312. /*----------------------------------------------------------*/
  313. enum {
  314.     kFSAFPServiceInfoVersion    = 1
  315. };
  316.  
  317.  
  318. struct AFPServiceInfo {
  319.     SInt16                             versionNumber;                /* version number for this record */
  320.     SInt16                             afpOverTCPIPEnable;            /* Enable AFP over TCPIP, 1-enable, 0-not enable */
  321.     SInt16                             afpOverTCPIPStatus;
  322.     SInt16                             afpOverATalkEnable;            /* Enable AFP over AppleTalk, 1-enable, 0-not enable */
  323. };
  324. typedef struct AFPServiceInfo            AFPServiceInfo;
  325. /*----------------------------------------------------------*/
  326. /*        Server Preference - SMB Information                    */
  327. /*----------------------------------------------------------*/
  328. enum {
  329.     kFSSMBServiceInfoVersion    = 1
  330. };
  331.  
  332. enum {
  333.     kFSSMBMaxNetBIOSnameLength    = 15,
  334.     kFSSMBMaxWorkGroupLength    = 15,
  335.     kFSSMBMaxCommentLength        = 43,
  336.     kFSSMBWINSAddressLength        = 62
  337. };
  338.  
  339.  
  340. struct SMBServiceInfo {
  341.     SInt16                             versionNumber;                /* version number for this record */
  342.     SInt16                             smbEnable;                    /* Enable SMB, 1-enable, 0-not enable */
  343.     SInt16                             status;
  344.     SInt16                             guestEnabled;                /* Whether guest allowed for SMB */
  345.     Str31                             netBIOSname;                /* Server name. Limited to 15 bytes */
  346.     Str31                             workGroup;                    /* NETBIOS group name.  Limited to 15 bytes */
  347.     Str63                             comment;                    /* ASCII comment for the server. Limited to 43 bytes */
  348.     SInt16                             winsEnabled;                /* Enable WINS, 1-enable, 0-not enable */
  349.     Str63                             winsAddress;                /* WINS IP address */
  350.  
  351. };
  352. typedef struct SMBServiceInfo            SMBServiceInfo;
  353. /*----------------------------------------------------------------------*/
  354. /*        MIME type changes - Notify server SrvrMimeTypePrefs has changed    */
  355. /*----------------------------------------------------------------------*/
  356. enum {
  357.     kFSMimeTypeChangedVersion    = 1
  358. };
  359.  
  360.  
  361. struct MimeTypeChanged {
  362.     SInt16                             version;                    /* version number for this record */
  363.     SInt32                             counter;                    /* no meaning, just for notification */
  364. };
  365. typedef struct MimeTypeChanged            MimeTypeChanged;
  366. /*----------------------------------------------------------*/
  367. /*        IPFilter Options - Advanced option for filtering IP */
  368. /*----------------------------------------------------------*/
  369. enum {
  370.     kFSIPFilterAllow            = 1
  371. };
  372.  
  373. /* Structure of individual filters */
  374.  
  375. struct IPFilterStruct {
  376.     SInt16                             allow;                        /* 0 for disallow, 1 for allow */
  377.     UInt32                             highIPBytes;
  378.     UInt32                             lowIPBytes;
  379. };
  380. typedef struct IPFilterStruct            IPFilterStruct;
  381. enum {
  382.     kFSMaxIPFilters                = 10
  383. };
  384.  
  385.  
  386. struct IPFilterInfo {
  387.     SInt16                             versionNumber;                /* version number for this record */
  388.     SInt16                             numFilters;                    /* numberOfIPFilters */
  389.     IPFilterStruct                     filters[10];
  390. };
  391. typedef struct IPFilterInfo                IPFilterInfo;
  392. /*----------------------------------------------------------*/
  393. /*        Max connection information                            */
  394. /*----------------------------------------------------------*/
  395. /*
  396.    tags for this record are type:kFSCreatorSig  and attribute:kFSMacConnextion
  397.    this value will be used if the max connection number encoded in serial number is 250
  398. */
  399. enum {
  400.     kFSServerMaxConnectionInfoVersion = 1
  401. };
  402.  
  403.  
  404. struct ServerMaxConnectionInfo {
  405.     SInt16                             version;
  406.     SInt32                             flag;                        /* reserved for future use */
  407.     SInt32                             maxConnection;
  408. };
  409. typedef struct ServerMaxConnectionInfo    ServerMaxConnectionInfo;
  410. /* ------------------------------------------------------------------------------------------------- */
  411.  
  412. #if PRAGMA_STRUCT_ALIGN
  413.     #pragma options align=reset
  414. #elif PRAGMA_STRUCT_PACKPUSH
  415.     #pragma pack(pop)
  416. #elif PRAGMA_STRUCT_PACK
  417.     #pragma pack()
  418. #endif
  419.  
  420. #ifdef PRAGMA_IMPORT_OFF
  421. #pragma import off
  422. #elif PRAGMA_IMPORT
  423. #pragma import reset
  424. #endif
  425.  
  426. #ifdef __cplusplus
  427. }
  428. #endif
  429.  
  430. #endif /* __APPLESHAREFILESERVERREGISTRY__ */
  431.  
  432.